import request from "@/router/axios";
// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/hg-quality/urgentpass/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 详情
export const getDetail = (id) => {
  return request({
    url: '/api/hg-quality/urgentpass/detail',
    method: 'get',
    params: {
      id
    }
  })
}



// 新增
export const add = (data) => {
  return request({
    url: '/api/hg-quality/urgentpass/save',
    method: 'post',
    data: data,
    params: {
      
    }
  })
}

// 修改
export const update = (data) => {
  return request({
    url: '/api/hg-quality/urgentpass/update',
    method: 'post',
    data: data,
    params: {
      
    }
  })
}

//获取质检单号
export const getInspectlist = () => {
  return request({
    url: '/api/hg-quality/inspectlist/list',
    method: 'get',
    params: {
    }
  })
}
//获取产品图号
export const getProductNumberList = () => {
  return request({
    url: '/api/hg-public/prdinfo/list',
    method: 'get',
    params: {
      
    }
  })
}

//获取交付规格
export const getPrdinfoList = (params,current,size) => {
  return request({
    url: '/api/hg-public/materialinfo/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
//删除
export const remove = (ids) => {
  return request({
    url: '/api/hg-quality/urgentpass/remove',
    method: 'post',
    params: {
      ids
    }
  })
}

// 审批
export const startProcess = (id) => {
  return request({
    url: '/api/hg-quality/urgentpass/start-process',
    method: 'post',
    params: {
      id
    }
  })
}